<style>
    .device-box{
        list-style-type: none;
    }
    .device-box li{
        min-width: 90px;
        text-align: left;
        float: left;
    }
    .device-box li label{font-weight: normal;}
</style>
<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2">房间标题:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="title" name="row[title]" value="" data-rule="required;title" />
        </div>
    </div>
    <div class="form-group">
        <label for="description" class="control-label col-xs-12 col-sm-2">房间描述:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea  class="form-control" id="description" name="row[description]"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label for="price" class="control-label col-xs-12 col-sm-2">价格:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="price" name="row[price]" value="" data-rule="required;price" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">地理位置:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="col-xs-12">
                <div class="form-group">
                    <label for="location" class="control-label col-xs-12 col-sm-2">位置:</label>
                    <div class="col-xs-12 col-sm-10">
                        <input type="text" class="form-control" id="location" name="row[location]" placeholder="位置" readonly="readonly"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">坐标:</label>
                    <div class="col-xs-12 col-sm-10">
                        <div class="col-xs-6">
                            <input placeholder="经度" class="form-control" id="map_longitude" name="row[map_longitude]" readonly="readonly" style="padding-left: 0;"/>
                        </div>
                        <div class="col-xs-6">
                            <input placeholder="纬度" class="form-control" id="map_latitude" name="row[map_latitude]" readonly="readonly" style="padding-right: 0;"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <button type="button" class="btn btn-primary" id="map-btn">编辑地理位置</button>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">设施:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="device-box">
                {foreach name="devices" id="vo"}
                <li><label><input type="checkbox" name="row[device]" value="{$vo.id}" id="device_{$vo.id}" /> {$vo.title}</label></li>
                {/foreach}
            </ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">电器:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="device-box">
                {foreach name="homes" id="vo"}
                <li><label><input type="checkbox" name="row[home]" value="{$vo.id}" id="home_{$vo.id}" /> {$vo.title}</label></li>
                {/foreach}
            </ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">卫浴:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="device-box">
                {foreach name="bathrooms" id="vo"}
                <li><label><input type="checkbox" name="row[bathroom]" value="{$vo.id}" id="bathroom_{$vo.id}" /> {$vo.title}</label></li>
                {/foreach}
            </ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">服务:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="device-box">
                {foreach name="services" id="vo"}
                <li><label><input type="checkbox" name="row[service]" value="{$vo.id}" id="service_{$vo.id}" /> {$vo.title}</label></li>
                {/foreach}
            </ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">状态:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_close]', ['0'=>'开启', '1'=>'关闭'])}
        </div>
    </div>
    <div class="form-group">
        <label for="notice" class="control-label col-xs-12 col-sm-2">入住须知:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea  class="form-control" id="notice" name="row[notice]"></textarea>
        </div>
    </div>

    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>